

#########################################
# 常用工具
#########################################
sudo apt install htop -y
sudo apt install net-tools -y
sudo apt install openssh-server -y
sudo apt install cutecom -y    #可选
sudo apt install tree -y
# byaml-cpp
sudo apt install libyaml-cpp-dev -y
# nlohmann-json3
# sudo apt-get install ros-humble-nlohmann-json-schema-validator-vendor -y
sudo apt install nlohmann-json3-dev -y
# sqlitebrowser
sudo apt install sqlitebrowser -y
# doxygen graphviz
sudo apt install doxygen graphviz -y
# pip3
sudo apt install python3-pip -y
# 自动补全 并在
sudo apt-get install python3-argcomplete -y

## 自动补全 bash 用户
sudo apt-get install bash-completion
## source /opt/ros/humble/setup.bash
## 自动补全 zsh 用户
## source /opt/ros/humble/setup.zsh
## eval "$(register-python-argcomplete3 ros2)"
## eval "$(register-python-argcomplete3 colcon)"
# 安装GNU Image Manipulation Program（GIMP）  可点击图标启动，可指令gimp启动
sudo apt install gimp -y
# 磁盘工具
sudo apt install smartmontools -y
sudo apt install iotop -y
# lsblk |grep -v ^loop
# sudo smartctl --info /dev/sda3
# sudo smartctl --all /dev/sda3
# nodejs
sudo apt install nodejs -y
# candump、cansend
sudo apt install can-utils -y
# valgrind massif-visualizer kcachegrind
sudo apt install valgrind -y
# valgrind --version
sudo apt install massif-visualizer -y
# massif-visualizer --version   #需要桌面运行此命令
sudo apt install kcachegrind -y
# callgrind_annotate valgrind_motion_control.log > output.callgrind # 从 memcheck 日志生成 callgrind 格式
# kcachegrind output.callgrind #可视化分析
# terminator
sudo apt-get install terminator -y

#########################################
# 常用功能包 + 依赖项
#########################################
# lslidar
sudo apt-get install libpcap-dev -y
# glog gflags
sudo apt-get install libgoogle-glog-dev libgflags-dev -y
# ceres
# dpkg -l libceres-dev
# sudo apt-get install libatlas-base-dev  -y    #atlas ​​高性能线性代数运算​​库
sudo apt-get install libsuitesparse-dev  -y     #SuiteSparse 高性能的稀疏矩阵运算库集
sudo apt install libceres-dev -y
# OrbbecSDK_ROS2
sudo apt install libgflags-dev nlohmann-json3-dev  \
ros-humble-image-transport ros-humble-image-transport-plugins ros-humble-compressed-image-transport \
ros-humble-image-publisher ros-humble-camera-info-manager \
ros-humble-diagnostic-updater ros-humble-diagnostic-msgs ros-humble-statistics-msgs \
ros-humble-backward-ros libdw-dev -y
# plotjuggler
sudo apt-get install ros-humble-plotjuggler-ros -y
# rqt-tf-tree 
sudo apt-get install ros-humble-rqt-tf-tree -y
# tf2-geometry-msgs
sudo apt install ros-humble-tf2-geometry-msgs
# slam-toolbox
sudo apt install ros-$ROS_DISTRO-slam-toolbox -y
# cartographer
sudo apt install ros-humble-cartographer ros-humble-cartographer-ros -y
# navigation2
sudo apt-get install ros-humble-test-msgs -y
sudo apt-get install ros-humble-geographic-msgs -y
sudo apt-get install ros-humble-behaviortree-cpp -y
sudo apt-get install ros-$ROS_DISTRO-message-filters -y
sudo apt-get install ros-$ROS_DISTRO-navigation2 -y
sudo apt-get install ros-$ROS_DISTRO-nav2-bringup -y
# imu-tools
sudo apt-get install ros-humble-imu-tools -y
# robot-localization
# sudo apt-get install libgeographic19 libgeographic-dev -y
sudo apt-get install ros-humble-robot-localization -y
# wit_imu
sudo apt install python3-pip -y
pip3 install pyserial 
pip3 install crcmod 
sudo apt-get install ros-humble-tf-transformations -y
# 禁用盲文终端支持服务brltty，避免QinHeng Electronics CH340 serial converter 串口转换失败
# sudo dmesg | grep tty
sudo systemctl stop brltty
sudo systemctl disable brltty
sudo apt remove brltty -y
# cgal
# https://doc.cgal.org/latest/Manual/usage.html
sudo apt-get install libcgal-demo -y
sudo apt-get install libcgal-dev -y

# teb_local_planner
# https://github.com/rst-tu-dortmund/teb_local_planner.git -b humble-devel
sudo apt install ros-humble-libg2o -y
# stage_ros2
sudo apt-get install git cmake g++ libjpeg8-dev libpng-dev libglu1-mesa-dev libltdl-dev libfltk1.1-dev -y
# pcl pcl-ros pcl-conversions
sudo apt install libpcl-dev -y
sudo apt install ros-humble-pcl-ros ros-humble-pcl-conversions -y
# gazebo-ros-pkgs
sudo apt-get install ros-humble-gazebo-ros-pkgs 

# g2o
# 方式一 
sudo apt install ros-humble-libg2o -y
## 方式二 源码安装 https://github.com/RainerKuemmerle/g2o
sudo apt install libeigen3-dev libspdlog-dev libsuitesparse-dev qtdeclarative5-dev qt5-qmake libqglviewer-dev-qt5 -y
# git clone https://github.com/RainerKuemmerle/g2o.git
# cd g2o
# mkdir build
# cd build
# cmake ..
# make
# sudo make install
# g2o --version

# cyclonedds-cpp
# https://github.com/ros-navigation/navigation2/issues/3352#issuecomment-1374005889
sudo apt install ros-humble-rmw-cyclonedds-cpp -y
# export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp


